Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Raw • Download


sbapp/kivymd/theming.py 0.7.2 (6fcff084) Text, 58.55 KB

T8b949e"""
Themes/Theming
==============

.. seealso::

`Material Design spec, Material theming <https://material.io/design/material-theming>`_

Material App
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The main class of your application, which in `Kivy` inherits from the
:class:`~kivy.app.App` class, in `KivyMD` must inherit from the
:class:`~kivymd.app.MDApp` class. The :class:`~kivymd.app.MDApp` class has
properties that allow you to control application properties such as
:attr:`color/style/font` of interface elements and much more.

Control material properties
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The main application class inherited from the :class:`~kivymd.app.MDApp` class
has the :attr:`~kivymd.app.MDApp.theme_cls` attribute, with which you control
the material properties of your application.

Changing the theme colors
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The standard theme_cls is designed to provide the standard themes and colors as
defined by Material Design.

We do not recommend that you change this.

However, if you do need to change the standard colors, for instance to meet branding
guidelines, you can do this by overloading the `color_definitions.py` object.

Create a custom color defintion object. This should have the same format as
the `colors <https://kivymd.readthedocs.io/en/latest/themes/color-definitions/#module-kivymd.color_definitions>`_
object in `color_definitions.py` and contain definitions for at least the
primary color, the accent color and the Light and Dark backgrounds.

.. note:: Your custom colors *must* use the names of the
`existing colors as defined in the palette <https://kivymd.readthedocs.io/en/latest/themes/color-definitions/#kivymd.color_definitions.palette>`_
e.g. You can have `Blue` but you cannot have `NavyBlue`.

Add the custom theme to the :class:`~kivymd.app.MDApp` as shown in the
following snippet.

.. tabs::

.. tab:: Imperative python style with KV

.. code-block:: python

from kivy.lang import Builder
from kivy.properties import ObjectProperty

from kivymd.app import MDApp
from kivymd.uix.floatlayout import MDFloatLayout
from kivymd.uix.tab import MDTabsBase
from kivymd.icon_definitions import md_icons

colors = {
"Teal": {
"200": "#212121",
"500": "#212121",
"700": "#212121",
},
"Red": {
"200": "#C25554",
"500": "#C25554",
"700": "#C25554",
},
"Light": {
"StatusBar": "E0E0E0",
"AppBar": "#202020",
"Background": "#2E3032",
"CardsDialogs": "#FFFFFF",
"FlatButtonDown": "#CCCCCC",
},
}


KV = '''
MDBoxLayout:
orientation: "vertical"

MDTopAppBar:
title: "Custom theme"

MDTabs:
id: tabs


<Tab>

MDIconButton:
id: icon
icon: root.icon
icon_size: "48sp"
theme_icon_color: "Custom"
icon_color: "white"
pos_hint: {"center_x": .5, "center_y": .5}
'''


class Tab(MDFloatLayout, MDTabsBase):
'''Class implementing content for a tab.'''

icon = ObjectProperty()


class Example(MDApp):
icons = list(md_icons.keys())[15:30]

def build(self):
self.theme_cls.colors = colors
self.theme_cls.primary_palette = "Teal"
self.theme_cls.accent_palette = "Red"
return Builder.load_string(KV)

def on_start(self):
for name_tab in self.icons:
tab = Tab(title="This is " + name_tab, icon=name_tab)
self.root.ids.tabs.add_widget(tab)


Example().run()

.. tab:: Declarative python style

.. code-block:: python

from kivy.properties import ObjectProperty

from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.button import MDIconButton
from kivymd.uix.floatlayout import MDFloatLayout
from kivymd.uix.tab import MDTabsBase, MDTabs
from kivymd.icon_definitions import md_icons
from kivymd.uix.toolbar import MDTopAppBar

colors = {
"Teal": {
"200": "#212121",
"500": "#212121",
"700": "#212121",
},
"Red": {
"200": "#C25554",
"500": "#C25554",
"700": "#C25554",
},
"Light": {
"StatusBar": "E0E0E0",
"AppBar": "#202020",
"Background": "#2E3032",
"CardsDialogs": "#FFFFFF",
"FlatButtonDown": "#CCCCCC",
},
}


class Tab(MDFloatLayout, MDTabsBase):
'''Class implementing content for a tab.'''

icon = ObjectProperty()


class Example(MDApp):
icons = list(md_icons.keys())[15:30]

def build(self):
self.theme_cls.colors = colors
self.theme_cls.primary_palette = "Teal"
self.theme_cls.accent_palette = "Red"

return (
MDBoxLayout(
MDTopAppBar(title="Custom theme"),
MDTabs(id="tabs"),
orientation="vertical",
)
)

def on_start(self):
for name_tab in self.icons:
self.root.ids.tabs.add_widget(
Tab(
MDIconButton(
icon=name_tab,
icon_size="48sp",
theme_icon_color="Custom",
icon_color="white",
pos_hint={"center_x": .5, "center_y": .5},
),
title="This is " + name_tab,
icon=name_tab,
)
)


Example().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/custom-color.png
:align: center

This will change the theme colors to your custom definition. In all other
respects, the theming stays as documented.

.. warning:: Please note that the key ``'Red'`` is a required key for the
dictionary :attr:`kivymd.color_definition.colors`.
"""

Tff7b72from T7ee787kivyT7ee787.T7ee787animation Tff7b72import Te6edf3Animation
Tff7b72from T7ee787kivyT7ee787.T7ee787app Tff7b72import Te6edf3App
Tff7b72from T7ee787kivyT7ee787.T7ee787clock Tff7b72import Te6edf3Clock
Tff7b72from T7ee787kivyT7ee787.T7ee787coreT7ee787.T7ee787window Tff7b72import Te6edf3Window
Tff7b72from T7ee787kivyT7ee787.T7ee787event Tff7b72import Te6edf3EventDispatcher
Tff7b72from T7ee787kivyT7ee787.T7ee787metrics Tff7b72import Te6edf3dp
Tff7b72from T7ee787kivyT7ee787.T7ee787properties Tff7b72import Tb4b4b4(
Te6edf3AliasPropertyTb4b4b4,
Te6edf3BooleanPropertyTb4b4b4,
Te6edf3ColorPropertyTb4b4b4,
Te6edf3DictPropertyTb4b4b4,
Te6edf3NumericPropertyTb4b4b4,
Te6edf3ObjectPropertyTb4b4b4,
Te6edf3OptionPropertyTb4b4b4,
Te6edf3StringPropertyTb4b4b4,
Tb4b4b4)
Tff7b72from T7ee787kivyT7ee787.T7ee787utils Tff7b72import Te6edf3get_color_from_hex

Tff7b72from T7ee787kivymdT7ee787.T7ee787color_definitions Tff7b72import Te6edf3colorsTb4b4b4, Te6edf3hueTb4b4b4, Te6edf3palette
Tff7b72from T7ee787kivymdT7ee787.T7ee787font_definitions Tff7b72import Te6edf3theme_font_styles
Tff7b72from T7ee787kivymdT7ee787.T7ee787material_resources Tff7b72import Te6edf3DEVICE_IOSTb4b4b4, Te6edf3DEVICE_TYPE


Tff7b72class T56d364ThemeManagerTb4b4b4(Te6edf3EventDispatcherTb4b4b4)Tb4b4b4:
Te6edf3primary_palette Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ffBlueTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3paletteTb4b4b4)
T8b949e"""
The name of the color scheme that the application will use.
All major `material` components will have the color
of the specified color theme.

Available options are: `'Red'`, `'Pink'`, `'Purple'`, `'DeepPurple'`,
`'Indigo'`, `'Blue'`, `'LightBlue'`, `'Cyan'`, `'Teal'`, `'Green'`,
`'LightGreen'`, `'Lime'`, `'Yellow'`, `'Amber'`, `'Orange'`, `'DeepOrange'`,
`'Brown'`, `'Gray'`, `'BlueGray'`.

To change the color scheme of an application:

.. tabs::

.. tab:: Imperative python style with KV

.. code-block:: python

from kivy.lang import Builder

from kivymd.app import MDApp

KV = '''
MDScreen:

MDRectangleFlatButton:
text: "Hello, World"
pos_hint: {"center_x": .5, "center_y": .5}
'''


class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Red" # "Purple", "Red"

return Builder.load_string(KV)


Example().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.button import MDRectangleFlatButton
from kivymd.uix.screen import MDScreen


class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange" # "Purple", "Red"

return (
MDScreen(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
)
)
)


Example().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/primary-palette.png
:align: center

:attr:`primary_palette` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'Blue'`.
"""

Te6edf3primary_hue Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ff500Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3hueTb4b4b4)
T8b949e"""
The color hue of the application.

Available options are: `'50'`, `'100'`, `'200'`, `'300'`, `'400'`, `'500'`,
`'600'`, `'700'`, `'800'`, `'900'`, `'A100'`, `'A200'`, `'A400'`, `'A700'`.

To change the hue color scheme of an application:

.. tabs::

.. tab:: Imperative python style with KV

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.screen import MDScreen
from kivymd.uix.button import MDRectangleFlatButton


class MainApp(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.primary_hue = "200" # "500"
screen = MDScreen()
screen.add_widget(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
)
)
return screen


MainApp().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.button import MDRectangleFlatButton
from kivymd.uix.screen import MDScreen


class Example(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_hue = "200" # "500"

return (
MDScreen(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
)
)
)


Example().run()

With a value of ``self.theme_cls.primary_hue = "200"`` and ``self.theme_cls.primary_hue = "500"``:

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/primary_hue.png
:align: center

:attr:`primary_hue` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'500'`.
"""

Te6edf3primary_light_hue Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ff200Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3hueTb4b4b4)
T8b949e"""
Hue value for :attr:`primary_light`.

:attr:`primary_light_hue` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'200'`.
"""

Te6edf3primary_dark_hue Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ff700Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3hueTb4b4b4)
T8b949e"""
Hue value for :attr:`primary_dark`.

:attr:`primary_light_hue` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'700'`.
"""

Tff7b72def Td2a8ff_get_primary_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Tff7b72selfTff7b72.Td2a8ffprimary_paletteTb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8ffprimary_hueTb4b4b4]
Tb4b4b4)

Te6edf3primary_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_primary_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4(Ta5d6ff"Ta5d6ffprimary_paletteTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffprimary_hueTa5d6ff"Tb4b4b4)
Tb4b4b4)
T8b949e"""
The color of the current application theme.

:attr:`primary_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value of the current application theme, property is readonly.
"""

Tff7b72def Td2a8ff_get_primary_lightTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Tff7b72selfTff7b72.Td2a8ffprimary_paletteTb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8ffprimary_light_hueTb4b4b4]
Tb4b4b4)

Te6edf3primary_light Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_primary_lightTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4(Ta5d6ff"Ta5d6ffprimary_paletteTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffprimary_light_hueTa5d6ff"Tb4b4b4)
Tb4b4b4)
T8b949e"""
Colors of the current application color theme (in lighter color).

.. tabs::

.. tab:: Declarative style with KV

.. code-block:: python

from kivy.lang import Builder

from kivymd.app import MDApp


KV = '''
MDScreen:

MDRaisedButton:
text: "primary_light"
pos_hint: {"center_x": 0.5, "center_y": 0.7}
md_bg_color: app.theme_cls.primary_light

MDRaisedButton:
text: "primary_color"
pos_hint: {"center_x": 0.5, "center_y": 0.5}

MDRaisedButton:
text: "primary_dark"
pos_hint: {"center_x": 0.5, "center_y": 0.3}
md_bg_color: app.theme_cls.primary_dark
'''


class MainApp(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
return Builder.load_string(KV)


MainApp().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.button import MDRaisedButton
from kivymd.uix.screen import MDScreen


class Example(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"

return (
MDScreen(
MDRaisedButton(
text="Primary light",
pos_hint={"center_x": 0.5, "center_y": 0.7},
md_bg_color=self.theme_cls.primary_light,
),
MDRaisedButton(
text="Primary color",
pos_hint={"center_x": 0.5, "center_y": 0.5},
),
MDRaisedButton(
text="Primary dark",
pos_hint={"center_x": 0.5, "center_y": 0.3},
md_bg_color=self.theme_cls.primary_dark,
),
)
)


Example().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/primary-colors-light-dark.png
:align: center

:attr:`primary_light` is an :class:`~kivy.properties.AliasProperty` that
returns the value of the current application theme (in lighter color),
property is readonly.
"""

Tff7b72def Td2a8ff_get_primary_darkTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Tff7b72selfTff7b72.Td2a8ffprimary_paletteTb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8ffprimary_dark_hueTb4b4b4]
Tb4b4b4)

Te6edf3primary_dark Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_primary_darkTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4(Ta5d6ff"Ta5d6ffprimary_paletteTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffprimary_dark_hueTa5d6ff"Tb4b4b4)
Tb4b4b4)
T8b949e"""
Colors of the current application color theme (in darker color).

:attr:`primary_dark` is an :class:`~kivy.properties.AliasProperty` that
returns the value of the current application theme (in darker color),
property is readonly.
"""

Te6edf3accent_palette Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ffAmberTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3paletteTb4b4b4)
T8b949e"""
The application color palette used for items such as the tab indicator
in the :class:`~kivymd.uix.tab.MDTabsBar` class and so on.
See :attr:`kivymd.uix.tab.MDTabsBar.indicator_color` attribute.

:attr:`accent_palette` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'Amber'`.
"""

Te6edf3accent_hue Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ff500Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3hueTb4b4b4)
T8b949e"""
Similar to :attr:`primary_hue`, but returns a value for :attr:`accent_palette`.

:attr:`accent_hue` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'500'`.
"""

Te6edf3accent_light_hue Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ff200Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3hueTb4b4b4)
T8b949e"""
Hue value for :attr:`accent_light`.

:attr:`accent_light_hue` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'200'`.
"""

Te6edf3accent_dark_hue Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ff700Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Te6edf3hueTb4b4b4)
T8b949e"""
Hue value for :attr:`accent_dark`.

:attr:`accent_dark_hue` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'700'`.
"""

Tff7b72def Td2a8ff_get_accent_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Tff7b72selfTff7b72.Td2a8ffaccent_paletteTb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8ffaccent_hueTb4b4b4]
Tb4b4b4)

Te6edf3accent_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_accent_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffaccent_paletteTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffaccent_hueTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Similar to :attr:`primary_color`, but returns a value for :attr:`accent_color`.

:attr:`accent_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`accent_color`, property is
readonly.
"""

Tff7b72def Td2a8ff_get_accent_lightTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Tff7b72selfTff7b72.Td2a8ffaccent_paletteTb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8ffaccent_light_hueTb4b4b4]
Tb4b4b4)

Te6edf3accent_light Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_accent_lightTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffaccent_paletteTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffaccent_light_hueTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Similar to :attr:`primary_light`, but returns a value for :attr:`accent_light`.

:attr:`accent_light` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`accent_light`, property is
readonly.
"""

Tff7b72def Td2a8ff_get_accent_darkTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Tff7b72selfTff7b72.Td2a8ffaccent_paletteTb4b4b4]Tb4b4b4[Tff7b72selfTff7b72.Td2a8ffaccent_dark_hueTb4b4b4]
Tb4b4b4)

Te6edf3accent_dark Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_accent_darkTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffaccent_paletteTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffaccent_dark_hueTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Similar to :attr:`primary_dark`, but returns a value for :attr:`accent_dark`.

:attr:`accent_dark` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`accent_dark`, property is
readonly.
"""

Te6edf3material_style Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ffM3Ta5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffM2Ta5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffM3Ta5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Material design style.
Available options are: 'M2', 'M3'.

.. versionadded:: 1.0.0

.. versionchanged:: 1.2.0
By default now `'M3'`.

.. seealso::

`Material Design 2 <https://material.io/>`_ and
`Material Design 3 <https://m3.material.io>`_


:attr:`material_style` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'M3'`.
"""

Te6edf3theme_style_switch_animation Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
Animate app colors when switching app color scheme ('Dark/light').

.. versionadded:: 1.1.0

.. tabs::

.. tab:: Declarative KV style

.. code-block:: python

from kivy.lang import Builder

from kivymd.app import MDApp

KV = '''
MDScreen:

MDCard:
orientation: "vertical"
padding: 0, 0, 0 , "36dp"
size_hint: .5, .5
pos_hint: {"center_x": .5, "center_y": .5}
elevation: 2
shadow_offset: 0, -2

MDLabel:
text: "Theme style - {}".format(app.theme_cls.theme_style)
halign: "center"
valign: "center"
bold: True
font_style: "H5"

MDRaisedButton:
text: "Set theme"
on_release: app.switch_theme_style()
pos_hint: {"center_x": .5}
'''


class Example(MDApp):
def build(self):
self.theme_cls.theme_style_switch_animation = True
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
return Builder.load_string(KV)

def switch_theme_style(self):
self.theme_cls.primary_palette = (
"Orange" if self.theme_cls.primary_palette == "Red" else "Red"
)
self.theme_cls.theme_style = (
"Dark" if self.theme_cls.theme_style == "Light" else "Light"
)


Example().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.button import MDRaisedButton
from kivymd.uix.card import MDCard
from kivymd.uix.label import MDLabel
from kivymd.uix.screen import MDScreen


class Example(MDApp):
def build(self):
self.theme_cls.theme_style_switch_animation = True
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
return (
MDScreen(
MDCard(
MDLabel(
id="label",
text="Theme style - {}".format(self.theme_cls.theme_style),
halign="center",
valign="center",
bold=True,
font_style="H5",
),
MDRaisedButton(
text="Set theme",
on_release=self.switch_theme_style,
pos_hint={"center_x": 0.5},
),
id="card",
orientation="vertical",
padding=(0, 0, 0, "36dp"),
size_hint=(0.5, 0.5),
pos_hint={"center_x": 0.5, "center_y": 0.5},
elevation=2,
shadow_offset=(0, -2),
)
)
)

def switch_theme_style(self, *args):
self.theme_cls.primary_palette = (
"Orange" if self.theme_cls.primary_palette == "Red" else "Red"
)
self.theme_cls.theme_style = (
"Dark" if self.theme_cls.theme_style == "Light" else "Light"
)
self.root.ids.card.ids.label.text = (
"Theme style - {}".format(self.theme_cls.theme_style)
)


Example().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/theme-style-switch-animation.gif
:align: center

:attr:`theme_style_switch_animation` is an :class:`~kivy.properties.BooleanProperty`
and defaults to `False`.
"""

Te6edf3theme_style_switch_animation_duration Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff0.2Tb4b4b4)
T8b949e"""
Duration of the animation of switching the color scheme of the application
("Dark/light").

.. versionadded:: 1.1.0

.. code-block:: python

class Example(MDApp):
def build(self):
self.theme_cls.theme_style_switch_animation = True
self.theme_cls.theme_style_switch_animation_duration = 0.8

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/theme-style-switch-animation-duration.gif
:align: center

:attr:`theme_style_switch_animation_duration` is an :class:`~kivy.properties.NumericProperty`
and defaults to `0.2`.
"""

Te6edf3theme_style Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
App theme style.

.. tabs::

.. tab:: Imperative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.screen import MDScreen
from kivymd.uix.button import MDRectangleFlatButton


class MainApp(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark" # "Light"
screen = MDScreen()
screen.add_widget(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
)
)
return screen


MainApp().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.button import MDRectangleFlatButton
from kivymd.uix.screen import MDScreen


class Example(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark" # "Light"

return (
MDScreen(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
),
)
)


Example().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/theme-style.png
:align: center

:attr:`theme_style` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'Light'`.
"""

Tff7b72def Td2a8ff_get_theme_styleTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657boolTb4b4b4) Tff7b72-Tff7b72> Tffa657strTb4b4b4:
Tff7b72if Te6edf3oppositeTb4b4b4:
Tff7b72return Ta5d6ff"Ta5d6ffLightTa5d6ff" Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff" Tff7b72else Ta5d6ff"Ta5d6ffDarkTa5d6ff"
Tff7b72elseTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8fftheme_style

Tff7b72def Td2a8ff_get_bg_darkestTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffStatusBarTa5d6ff"Tb4b4b4]Tb4b4b4)
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffStatusBarTa5d6ff"Tb4b4b4]Tb4b4b4)

Te6edf3bg_darkest Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_bg_darkestTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Similar to :attr:`bg_dark`,
but the color values are a tone lower (darker) than :attr:`bg_dark`.

.. tabs::

.. tab:: Declarative style with KV

.. code-block:: python

from kivy.lang import Builder

from kivymd.app import MDApp

KV = '''
MDBoxLayout:

MDWidget:
md_bg_color: app.theme_cls.bg_light

MDBoxLayout:
md_bg_color: app.theme_cls.bg_normal

MDBoxLayout:
md_bg_color: app.theme_cls.bg_dark

MDBoxLayout:
md_bg_color: app.theme_cls.bg_darkest
'''


class MainApp(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark" # "Light"
return Builder.load_string(KV)


MainApp().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.widget import MDWidget


class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark" # "Light"

return (
MDBoxLayout(
MDWidget(
md_bg_color=self.theme_cls.bg_light,
),
MDWidget(
md_bg_color=self.theme_cls.bg_normal,
),
MDWidget(
md_bg_color=self.theme_cls.bg_dark,
),
MDWidget(
md_bg_color=self.theme_cls.bg_darkest,
),
)
)


Example().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/bg-normal-dark-darkest.png
:align: center

:attr:`bg_darkest` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`bg_darkest`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_bg_darkestTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_bg_darkestTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_bg_darkest Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_bg_darkestTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`bg_darkest`.

:attr:`opposite_bg_darkest` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`opposite_bg_darkest`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_bg_darkTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffAppBarTa5d6ff"Tb4b4b4]Tb4b4b4)
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffAppBarTa5d6ff"Tb4b4b4]Tb4b4b4)

Te6edf3bg_dark Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_bg_darkTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Similar to :attr:`bg_normal`,
but the color values are one tone lower (darker) than :attr:`bg_normal`.

:attr:`bg_dark` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`bg_dark`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_bg_darkTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_bg_darkTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_bg_dark Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_op_bg_darkTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`bg_dark`.

:attr:`opposite_bg_dark` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`opposite_bg_dark`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_bg_normalTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffBackgroundTa5d6ff"Tb4b4b4]Tb4b4b4)
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffBackgroundTa5d6ff"Tb4b4b4]Tb4b4b4)

Te6edf3bg_normal Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_bg_normalTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Similar to :attr:`bg_light`,
but the color values are one tone lower (darker) than :attr:`bg_light`.

:attr:`bg_normal` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`bg_normal`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_bg_normalTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_bg_normalTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_bg_normal Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_op_bg_normalTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`bg_normal`.

:attr:`opposite_bg_normal` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`opposite_bg_normal`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_bg_lightTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffCardsDialogsTa5d6ff"Tb4b4b4]Tb4b4b4)
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffCardsDialogsTa5d6ff"Tb4b4b4]Tb4b4b4)

Te6edf3bg_light Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_bg_lightTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e""""
Depending on the style of the theme (`'Dark'` or `'Light`')
that the application uses, :attr:`bg_light` contains the color value
in ``rgba`` format for the widgets background.

:attr:`bg_light` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`bg_light`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_bg_lightTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_bg_lightTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_bg_light Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_op_bg_lightTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`bg_light`.

:attr:`opposite_bg_light` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`opposite_bg_light`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_divider_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ff000000Ta5d6ff"Tb4b4b4)
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ffFFFFFFTa5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.12
Tff7b72return Te6edf3color

Te6edf3divider_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_divider_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Color for dividing lines such as :class:`~kivymd.uix.card.MDSeparator`.

:attr:`divider_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`divider_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_divider_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_divider_colorTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_divider_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_divider_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`divider_color`.

:attr:`opposite_divider_color` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`opposite_divider_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_disabled_primary_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Te6edf3lum Tff7b72= Tffa657sumTb4b4b4(Tff7b72selfTff7b72.Td2a8ffprimary_colorTb4b4b4[T79c0ff0Tb4b4b4:T79c0ff3Tb4b4b4]Tb4b4b4) Tff7b72/ T79c0ff3.0
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Te6edf3a Tff7b72= T79c0ff0.38
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Te6edf3a Tff7b72= T79c0ff0.50
Tff7b72return Tb4b4b4[Te6edf3lumTb4b4b4, Te6edf3lumTb4b4b4, Te6edf3lumTb4b4b4, Te6edf3aTb4b4b4]

Te6edf3disabled_primary_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_disabled_primary_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The greyscale disabled version of the current application theme color
in ``rgba`` format.

.. versionadded:: 1.0.0

:attr:`disabled_primary_color`
is an :class:`~kivy.properties.AliasProperty` that returns the value
in ``rgba`` format for :attr:`disabled_primary_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_disabled_primary_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_disabled_primary_colorTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_disabled_primary_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_disabled_primary_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`disabled_primary_color`.

.. versionadded:: 1.0.0

:attr:`opposite_disabled_primary_color` is an
:class:`~kivy.properties.AliasProperty` that returns the value
in ``rgba`` format for :attr:`opposite_disabled_primary_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_text_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ff000000Ta5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.87
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ffFFFFFFTa5d6ff"Tb4b4b4)
Tff7b72return Te6edf3color

Te6edf3text_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_text_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Color of the text used in the :class:`~kivymd.uix.label.MDLabel`.

:attr:`text_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`text_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_text_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_text_colorTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_text_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_text_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`text_color`.

:attr:`opposite_text_color` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`opposite_text_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_secondary_text_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ff000000Ta5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.54
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ffFFFFFFTa5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.70
Tff7b72return Te6edf3color

Te6edf3secondary_text_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_secondary_text_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The color for the secondary text that is used in classes
from the module :class:`~kivymd/uix/list.TwoLineListItem`.

:attr:`secondary_text_color` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`secondary_text_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_secondary_text_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_secondary_text_colorTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_secondary_text_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_secondary_text_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`secondary_text_color`.

:attr:`opposite_secondary_text_color`
is an :class:`~kivy.properties.AliasProperty` that returns the value
in ``rgba`` format for :attr:`opposite_secondary_text_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_icon_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ff000000Ta5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.54
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ffFFFFFFTa5d6ff"Tb4b4b4)
Tff7b72return Te6edf3color

Te6edf3icon_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_icon_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Color of the icon used in the :class:`~kivymd.uix.button.MDIconButton`.

:attr:`icon_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`icon_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_icon_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_icon_colorTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_icon_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_icon_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`icon_color`.

:attr:`opposite_icon_color` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`opposite_icon_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_disabled_hint_text_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3oppositeTb4b4b4: Tffa657bool Tff7b72= Tff7b72FalseTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Te6edf3theme_style Tff7b72= Tff7b72selfTff7b72.Td2a8ff_get_theme_styleTb4b4b4(Te6edf3oppositeTb4b4b4)
Tff7b72if Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffLightTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ff000000Ta5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.38
Tff7b72elif Te6edf3theme_style Tff7b72== Ta5d6ff"Ta5d6ffDarkTa5d6ff"Tb4b4b4:
Te6edf3color Tff7b72= Te6edf3get_color_from_hexTb4b4b4(Ta5d6ff"Ta5d6ffFFFFFFTa5d6ff"Tb4b4b4)
Te6edf3colorTb4b4b4[T79c0ff3Tb4b4b4] Tff7b72= T79c0ff0.50
Tff7b72return Te6edf3color

Te6edf3disabled_hint_text_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_disabled_hint_text_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Color of the disabled text used in the :class:`~kivymd.uix.textfield.MDTextField`.

:attr:`disabled_hint_text_color`
is an :class:`~kivy.properties.AliasProperty` that returns the value
in ``rgba`` format for :attr:`disabled_hint_text_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_op_disabled_hint_text_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_get_disabled_hint_text_colorTb4b4b4(Tff7b72TrueTb4b4b4)

Te6edf3opposite_disabled_hint_text_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_op_disabled_hint_text_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
The opposite value of color in the :attr:`disabled_hint_text_color`.

:attr:`opposite_disabled_hint_text_color`
is an :class:`~kivy.properties.AliasProperty` that returns the value
in ``rgba`` format for :attr:`opposite_disabled_hint_text_color`,
property is readonly.
"""

T8b949e# Hardcoded because muh standard
Tff7b72def Td2a8ff_get_error_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Te6edf3get_color_from_hexTb4b4b4(Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Ta5d6ff"Ta5d6ffRedTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffA700Ta5d6ff"Tb4b4b4]Tb4b4b4)

Te6edf3error_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_error_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Color of the error text used
in the :class:`~kivymd.uix.textfield.MDTextField`.

:attr:`error_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`error_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_ripple_colorTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657listTb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ff_ripple_color

Tff7b72def Td2a8ff_set_ripple_colorTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3valueTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_ripple_color Tff7b72= Te6edf3value

Te6edf3_ripple_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Te6edf3colorsTb4b4b4[Ta5d6ff"Ta5d6ffGrayTa5d6ff"Tb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ff400Ta5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""Private value."""

Te6edf3ripple_color Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_ripple_colorTb4b4b4, Te6edf3_set_ripple_colorTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ff_ripple_colorTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Color of ripple effects.

:attr:`ripple_color` is an :class:`~kivy.properties.AliasProperty` that
returns the value in ``rgba`` format for :attr:`ripple_color`,
property is readonly.
"""

Tff7b72def Td2a8ff_determine_device_orientationTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3_Tb4b4b4, Te6edf3window_sizeTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Te6edf3window_sizeTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72> Te6edf3window_sizeTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffdevice_orientation Tff7b72= Ta5d6ff"Ta5d6fflandscapeTa5d6ff"
Tff7b72elif Te6edf3window_sizeTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72>Tff7b72= Te6edf3window_sizeTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffdevice_orientation Tff7b72= Ta5d6ff"Ta5d6ffportraitTa5d6ff"

Te6edf3device_orientation Tff7b72= Te6edf3StringPropertyTb4b4b4(Ta5d6ff"Ta5d6ff"Tb4b4b4)
T8b949e"""
Device orientation.

:attr:`device_orientation` is an :class:`~kivy.properties.StringProperty`.
"""

Tff7b72def Td2a8ff_get_standard_incrementTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657floatTb4b4b4:
Tff7b72if Te6edf3DEVICE_TYPE Tff7b72== Ta5d6ff"Ta5d6ffmobileTa5d6ff"Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffdevice_orientation Tff7b72== Ta5d6ff"Ta5d6fflandscapeTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72return Te6edf3dpTb4b4b4(T79c0ff56Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72return Te6edf3dpTb4b4b4(T79c0ff64Tb4b4b4)

Te6edf3standard_increment Tff7b72= Te6edf3AliasPropertyTb4b4b4(
Te6edf3_get_standard_incrementTb4b4b4, Te6edf3bindTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffdevice_orientationTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Value of standard increment.

:attr:`standard_increment` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`standard_increment`,
property is readonly.
"""

Tff7b72def Td2a8ff_get_horizontal_marginsTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657floatTb4b4b4:
Tff7b72if Te6edf3DEVICE_TYPE Tff7b72== Ta5d6ff"Ta5d6ffmobileTa5d6ff"Tb4b4b4:
Tff7b72return Te6edf3dpTb4b4b4(T79c0ff16Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72return Te6edf3dpTb4b4b4(T79c0ff24Tb4b4b4)

Te6edf3horizontal_margins Tff7b72= Te6edf3AliasPropertyTb4b4b4(Te6edf3_get_horizontal_marginsTb4b4b4)
T8b949e"""
Value of horizontal margins.

:attr:`horizontal_margins` is an :class:`~kivy.properties.AliasProperty`
that returns the value in ``rgba`` format for :attr:`horizontal_margins`,
property is readonly.
"""

Tff7b72def Td2a8ffon_theme_styleTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3intervalTb4b4b4: Tffa657intTb4b4b4, Te6edf3theme_styleTb4b4b4: Tffa657strTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Tb4b4b4(
Tffa657hasattrTb4b4b4(Te6edf3AppTff7b72.Td2a8ffget_running_appTb4b4b4(Tb4b4b4)Tb4b4b4, Ta5d6ff"Ta5d6fftheme_clsTa5d6ff"Tb4b4b4)
Tff7b72and Te6edf3AppTff7b72.Td2a8ffget_running_appTb4b4b4(Tb4b4b4)Tff7b72.Td2a8fftheme_cls Tff7b72== Tff7b72self
Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffset_clearcolor_by_theme_styleTb4b4b4(Te6edf3theme_styleTb4b4b4)

Te6edf3_set_clearcolor Tff7b72= Tff7b72False

Tff7b72def Td2a8ffset_clearcolor_by_theme_styleTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3theme_styleTb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_style_switch_animation Tff7b72and Tff7b72selfTff7b72.Td2a8ff_set_clearcolorTb4b4b4:
Te6edf3AnimationTb4b4b4(
Te6edf3clearcolorTff7b72=Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Te6edf3theme_styleTb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffBackgroundTa5d6ff"Tb4b4b4]
Tb4b4b4)Tb4b4b4,
Te6edf3dTff7b72=Tff7b72selfTff7b72.Td2a8fftheme_style_switch_animation_durationTb4b4b4,
Te6edf3tTff7b72=Ta5d6ff"Ta5d6fflinearTa5d6ff"Tb4b4b4,
Tb4b4b4)Tff7b72.Td2a8ffstartTb4b4b4(Te6edf3WindowTb4b4b4)
Tff7b72elseTb4b4b4:
Te6edf3WindowTff7b72.Td2a8ffclearcolor Tff7b72= Te6edf3get_color_from_hexTb4b4b4(
Tff7b72selfTff7b72.Td2a8ffcolorsTb4b4b4[Te6edf3theme_styleTb4b4b4]Tb4b4b4[Ta5d6ff"Ta5d6ffBackgroundTa5d6ff"Tb4b4b4]
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_set_clearcolor Tff7b72= Tff7b72True

T8b949e# Font name, size (sp), always caps, letter spacing (sp).
Te6edf3font_styles Tff7b72= Te6edf3DictPropertyTb4b4b4(
Tb4b4b4{
Ta5d6ff"Ta5d6ffH1Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoLightTa5d6ff"Tb4b4b4, T79c0ff96Tb4b4b4, Tff7b72FalseTb4b4b4, Tff7b72-T79c0ff1.5Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffH2Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoLightTa5d6ff"Tb4b4b4, T79c0ff60Tb4b4b4, Tff7b72FalseTb4b4b4, Tff7b72-T79c0ff0.5Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffH3Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff48Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffH4Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff34Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.25Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffH5Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff24Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffH6Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoMediumTa5d6ff"Tb4b4b4, T79c0ff20Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.15Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffSubtitle1Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff16Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.15Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffSubtitle2Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoMediumTa5d6ff"Tb4b4b4, T79c0ff14Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.1Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffBody1Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff16Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.5Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffBody2Ta5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff14Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.25Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffButtonTa5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoMediumTa5d6ff"Tb4b4b4, T79c0ff14Tb4b4b4, Tff7b72TrueTb4b4b4, T79c0ff1.25Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffCaptionTa5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff12Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0.4Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffOverlineTa5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffRobotoTa5d6ff"Tb4b4b4, T79c0ff10Tb4b4b4, Tff7b72TrueTb4b4b4, T79c0ff1.5Tb4b4b4]Tb4b4b4,
Ta5d6ff"Ta5d6ffIconTa5d6ff"Tb4b4b4: Tb4b4b4[Ta5d6ff"Ta5d6ffIconsTa5d6ff"Tb4b4b4, T79c0ff24Tb4b4b4, Tff7b72FalseTb4b4b4, T79c0ff0Tb4b4b4]Tb4b4b4,
Tb4b4b4}
Tb4b4b4)
T8b949e"""
Data of default font styles.

Add custom font
---------------

.. tabs::

.. tab:: Declarative style with KV

.. code-block:: python

from kivy.core.text import LabelBase
from kivy.lang import Builder

from kivymd.app import MDApp
from kivymd.font_definitions import theme_font_styles

KV = '''
MDScreen:

MDLabel:
text: "JetBrainsMono"
halign: "center"
font_style: "JetBrainsMono"
'''


class MainApp(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"

LabelBase.register(
name="JetBrainsMono",
fn_regular="JetBrainsMono-Regular.ttf")

theme_font_styles.append('JetBrainsMono')
self.theme_cls.font_styles["JetBrainsMono"] = [
"JetBrainsMono",
16,
False,
0.15,
]
return Builder.load_string(KV)


MainApp().run()

.. tab:: Declarative python style

.. code-block:: python

from kivy.core.text import LabelBase

from kivymd.app import MDApp
from kivymd.uix.screen import MDScreen
from kivymd.uix.label import MDLabel
from kivymd.font_definitions import theme_font_styles


class MainApp(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"

LabelBase.register(
name="JetBrainsMono",
fn_regular="JetBrainsMono-Regular.ttf")

theme_font_styles.append('JetBrainsMono')
self.theme_cls.font_styles["JetBrainsMono"] = [
"JetBrainsMono",
16,
False,
0.15,
]
return (
MDScreen(
MDLabel(
text="JetBrainsMono",
halign="center",
font_style="JetBrainsMono",
)
)
)


MainApp().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/font-styles.png
:align: center

:attr:`font_styles` is an :class:`~kivy.properties.DictProperty`.
"""

Tff7b72def Td2a8ffset_colorsTb4b4b4(
Tff7b72selfTb4b4b4,
Te6edf3primary_paletteTb4b4b4: Tffa657strTb4b4b4,
Te6edf3primary_hueTb4b4b4: Tffa657strTb4b4b4,
Te6edf3primary_light_hueTb4b4b4: Tffa657strTb4b4b4,
Te6edf3primary_dark_hueTb4b4b4: Tffa657strTb4b4b4,
Te6edf3accent_paletteTb4b4b4: Tffa657strTb4b4b4,
Te6edf3accent_hueTb4b4b4: Tffa657strTb4b4b4,
Te6edf3accent_light_hueTb4b4b4: Tffa657strTb4b4b4,
Te6edf3accent_dark_hueTb4b4b4: Tffa657strTb4b4b4,
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Courtesy method to allow all of the theme color attributes to be set in one call.

:attr:`set_colors` allows all of the following to be set in one method call:

* primary palette color,
* primary hue,
* primary light hue,
* primary dark hue,
* accent palette color,
* accent hue,
* accent ligth hue, and
* accent dark hue.

Note that all values *must* be provided. If you only want to set one or two values
use the appropriate method call for that.

.. tabs::

.. tab:: Imperative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.screen import MDScreen
from kivymd.uix.button import MDRectangleFlatButton

class MainApp(MDApp):
def build(self):
self.theme_cls.set_colors(
"Blue", "600", "50", "800", "Teal", "600", "100", "800"
)
screen = MDScreen()
screen.add_widget(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
)
)
return screen


MainApp().run()

.. tab:: Declarative python style

.. code-block:: python

from kivymd.app import MDApp
from kivymd.uix.screen import MDScreen
from kivymd.uix.button import MDRectangleFlatButton

class MainApp(MDApp):
def build(self):
self.theme_cls.set_colors(
"Blue", "600", "50", "800", "Teal", "600", "100", "800"
)
return (
MDScreen(
MDRectangleFlatButton(
text="Hello, World",
pos_hint={"center_x": 0.5, "center_y": 0.5},
)
)
)


MainApp().run()
"""

Tff7b72selfTff7b72.Td2a8ffprimary_palette Tff7b72= Te6edf3primary_palette
Tff7b72selfTff7b72.Td2a8ffprimary_hue Tff7b72= Te6edf3primary_hue
Tff7b72selfTff7b72.Td2a8ffprimary_light_hue Tff7b72= Te6edf3primary_light_hue
Tff7b72selfTff7b72.Td2a8ffprimary_dark_hue Tff7b72= Te6edf3primary_dark_hue
Tff7b72selfTff7b72.Td2a8ffaccent_palette Tff7b72= Te6edf3accent_palette
Tff7b72selfTff7b72.Td2a8ffaccent_hue Tff7b72= Te6edf3accent_hue
Tff7b72selfTff7b72.Td2a8ffaccent_light_hue Tff7b72= Te6edf3accent_light_hue
Tff7b72selfTff7b72.Td2a8ffaccent_dark_hue Tff7b72= Te6edf3accent_dark_hue

Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72lambda Te6edf3xTb4b4b4: Tff7b72selfTff7b72.Td2a8ffon_theme_styleTb4b4b4(T79c0ff0Tb4b4b4, Tff7b72selfTff7b72.Td2a8fftheme_styleTb4b4b4)Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ff_determine_device_orientationTb4b4b4(Tff7b72NoneTb4b4b4, Te6edf3WindowTff7b72.Td2a8ffsizeTb4b4b4)
Te6edf3WindowTff7b72.Td2a8ffbindTb4b4b4(Te6edf3sizeTff7b72=Tff7b72selfTff7b72.Td2a8ff_determine_device_orientationTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffbindTb4b4b4(Te6edf3font_stylesTff7b72=Tff7b72selfTff7b72.Td2a8ffsync_theme_stylesTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffcolors Tff7b72= Te6edf3colors
Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Tff7b72selfTff7b72.Td2a8ffsync_theme_stylesTb4b4b4)

Tff7b72def Td2a8ffsync_theme_stylesTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e# Syncs the values from self.font_styles to theme_font_styles
T8b949e# this will ensure continuity when someone registers a new font_style.
Tff7b72for Te6edf3numTb4b4b4, Te6edf3style Tff7b72in Tffa657enumerateTb4b4b4(Te6edf3theme_font_stylesTb4b4b4)Tb4b4b4:
Tff7b72if Te6edf3style Tff7b72not Tff7b72in Tff7b72selfTff7b72.Td2a8fffont_stylesTb4b4b4:
Te6edf3theme_font_stylesTff7b72.Td2a8ffpopTb4b4b4(Te6edf3numTb4b4b4)
Tff7b72for Te6edf3style Tff7b72in Tff7b72selfTff7b72.Td2a8fffont_stylesTff7b72.Td2a8ffkeysTb4b4b4(Tb4b4b4)Tb4b4b4:
Te6edf3theme_font_stylesTff7b72.Td2a8ffappendTb4b4b4(Te6edf3styleTb4b4b4)


Tff7b72class T56d364ThemableBehaviorTb4b4b4(Te6edf3EventDispatcherTb4b4b4)Tb4b4b4:
Te6edf3theme_cls Tff7b72= Te6edf3ObjectPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
Instance of :class:`~ThemeManager` class.

:attr:`theme_cls` is an :class:`~kivy.properties.ObjectProperty`.
"""

Te6edf3device_ios Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Te6edf3DEVICE_IOSTb4b4b4)
T8b949e"""
``True`` if device is ``iOS``.

:attr:`device_ios` is an :class:`~kivy.properties.BooleanProperty`.
"""

Te6edf3widget_style Tff7b72= Te6edf3OptionPropertyTb4b4b4(
Ta5d6ff"Ta5d6ffandroidTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffandroidTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffiosTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffdesktopTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Allows to set one of the three style properties for the widget:
`'android'`, `'ios'`, `'desktop'`.

For example, for the class :class:`~kivymd.uix.selectioncontrol.MDSwitch`
has two styles - `'android'` and `'ios'`:

.. code-block:: kv

MDSwitch:
widget_style: "ios"

.. code-block:: kv

MDSwitch:
widget_style: "android"

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/switch-android-ios.png
:align: center

:attr:`widget_style` is an :class:`~kivy.properties.OptionProperty`
and defaults to `'android'`.
"""

Te6edf3opposite_colors Tff7b72= Te6edf3BooleanPropertyTb4b4b4(Tff7b72FalseTb4b4b4)
T8b949e"""
For some widgets, for example, for a widget
:class:`~kivymd.uix.toolbar.MDTopAppBar` changes the color of the label to
the color opposite to the main theme.

.. code-block:: kv

MDTopAppBar:
title: "MDTopAppBar"
opposite_colors: True

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-opposite-true.png
:align: center

.. code-block:: kv

MDTopAppBar:
title: "MDTopAppBar"
opposite_colors: True

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-opposite-false.png
:align: center
"""

Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffunbind_properties Tff7b72= Tb4b4b4[
Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffmaterial_styleTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffdevice_orientationTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffprimary_colorTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffprimary_paletteTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffaccent_paletteTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6fftext_colorTa5d6ff"Tb4b4b4,
Tb4b4b4]

Tff7b72if Tff7b72selfTff7b72.Td2a8fftheme_cls Tff7b72is Tff7b72not Tff7b72NoneTb4b4b4:
Tff7b72pass
Tff7b72elseTb4b4b4:
Tff7b72tryTb4b4b4:
Tff7b72if Tff7b72not Tffa657isinstanceTb4b4b4(
Te6edf3AppTff7b72.Td2a8ffget_running_appTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffpropertyTb4b4b4(Ta5d6ff"Ta5d6fftheme_clsTa5d6ff"Tb4b4b4, Tff7b72TrueTb4b4b4)Tb4b4b4,
Te6edf3ObjectPropertyTb4b4b4,
Tb4b4b4)Tb4b4b4:
Tff7b72raise Tf85149ValueErrorTb4b4b4(
Ta5d6ff"Ta5d6ffKivyMD: App object must be inherited from Ta5d6ff"
Ta5d6ff"Ta5d6ff`kivymd.app.MDApp`Ta5d6ff"
Tb4b4b4)
Tff7b72except Tf85149AttributeErrorTb4b4b4:
Tff7b72raise Tf85149ValueErrorTb4b4b4(
Ta5d6ff"Ta5d6ffKivyMD: App object must be initialized before loading Ta5d6ff"
Ta5d6ff"Ta5d6ffroot widget. See Ta5d6ff"
Ta5d6ff"Ta5d6ffhttps://github.com/kivymd/KivyMD/wiki/Modules-Material-App#exceptionsTa5d6ff"
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8fftheme_cls Tff7b72= Te6edf3AppTff7b72.Td2a8ffget_running_appTb4b4b4(Tb4b4b4)Tff7b72.Td2a8fftheme_cls

Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)

T8b949e# Fix circular imports.
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787behaviors Tff7b72import Te6edf3CommonElevationBehavior
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787label Tff7b72import Te6edf3MDLabel
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787textfield Tff7b72import Te6edf3MDTextField

Tff7b72selfTff7b72.Td2a8ffcommon_elevation_behavior Tff7b72= Te6edf3CommonElevationBehavior
Tff7b72selfTff7b72.Td2a8ffmd_label Tff7b72= Te6edf3MDLabel
Tff7b72selfTff7b72.Td2a8ffmd_textfield Tff7b72= Te6edf3MDTextField

Tff7b72def Td2a8ffremove_widgetTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3widgetTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Tff7b72not Tffa657hasattrTb4b4b4(Te6edf3widgetTb4b4b4, Ta5d6ff"Ta5d6fftheme_clsTa5d6ff"Tb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffremove_widgetTb4b4b4(Te6edf3widgetTb4b4b4)
Tff7b72return

Te6edf3callbacks Tff7b72= Te6edf3widgetTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffget_property_observersTb4b4b4(Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4)

Tff7b72for Te6edf3callback Tff7b72in Te6edf3callbacksTb4b4b4:
Tff7b72tryTb4b4b4:
Tff7b72if Tffa657hasattrTb4b4b4(Te6edf3callbackTb4b4b4, Ta5d6ff"Ta5d6ffproxyTa5d6ff"Tb4b4b4) Tff7b72and Tffa657hasattrTb4b4b4(
Te6edf3callbackTff7b72.Td2a8ffproxyTb4b4b4, Ta5d6ff"Ta5d6fftheme_clsTa5d6ff"
Tb4b4b4)Tb4b4b4:
Tff7b72if Tffa657issubclassTb4b4b4(Te6edf3widgetTff7b72.Td2a8ff__class__Tb4b4b4, Tff7b72selfTff7b72.Td2a8ffmd_textfieldTb4b4b4)Tb4b4b4:
Te6edf3widgetTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffunbindTb4b4b4(
Tff7b72*Tff7b72*Tb4b4b4{
Ta5d6ff"Ta5d6fftheme_styleTa5d6ff"Tb4b4b4: Tffa657getattrTb4b4b4(
Te6edf3callbackTff7b72.Td2a8ffproxyTb4b4b4, Te6edf3callbackTff7b72.Td2a8ffmethod_name
Tb4b4b4)
Tb4b4b4}
Tb4b4b4)
Tff7b72for Te6edf3property_name Tff7b72in Tff7b72selfTff7b72.Td2a8ffunbind_propertiesTb4b4b4:
Tff7b72if Te6edf3widget Tff7b72== Te6edf3callbackTff7b72.Td2a8ffproxyTb4b4b4:
Te6edf3widgetTff7b72.Td2a8fftheme_clsTff7b72.Td2a8ffunbindTb4b4b4(
Tff7b72*Tff7b72*Tb4b4b4{
Te6edf3property_nameTb4b4b4: Tffa657getattrTb4b4b4(
Te6edf3callbackTff7b72.Td2a8ffproxyTb4b4b4, Te6edf3callbackTff7b72.Td2a8ffmethod_name
Tb4b4b4)
Tb4b4b4}
Tb4b4b4)
T8b949e# KivyMD widgets may contain other MD widgets.
Tff7b72for Te6edf3children Tff7b72in Te6edf3widgetTff7b72.Td2a8ffchildrenTb4b4b4:
Tff7b72if Tffa657hasattrTb4b4b4(Te6edf3childrenTb4b4b4, Ta5d6ff"Ta5d6fftheme_clsTa5d6ff"Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffremove_widgetTb4b4b4(Te6edf3childrenTb4b4b4)
Tff7b72except Tf85149ReferenceErrorTb4b4b4:
Tff7b72pass

T8b949e# Canceling a scheduled method call on_window_touch for MDLabel
T8b949e# objects.
Tff7b72if Tb4b4b4(
Tffa657issubclassTb4b4b4(Te6edf3widgetTff7b72.Td2a8ff__class__Tb4b4b4, Tff7b72selfTff7b72.Td2a8ffmd_labelTb4b4b4)
Tff7b72and Tff7b72selfTff7b72.Td2a8ffmd_labelTff7b72.Td2a8ffallow_selection
Tb4b4b4)Tb4b4b4:
Te6edf3WindowTff7b72.Td2a8ffunbindTb4b4b4(Te6edf3on_touch_downTff7b72=Te6edf3widgetTff7b72.Td2a8ffon_window_touchTb4b4b4)

Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffremove_widgetTb4b4b4(Te6edf3widgetTb4b4b4)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────